//
//  UIView+DYCFrame.m
//  DYCBaisi
//
//  Created by Yachao on 17/6/29.
//  Copyright © 2017年 Yachao. All rights reserved.
//

#import "UIView+DYCFrame.h"

@implementation UIView (DYCFrame)

- (void)setDyc_width:(CGFloat)dyc_width{
    CGRect rect = self.frame;
    rect.size.width = dyc_width;
    self.frame = rect;
}

- (CGFloat)dyc_width{
    return self.frame.size.width;
}

- (void)setDyc_height:(CGFloat)dyc_height{
    CGRect rect = self.frame;
    rect.size.height = dyc_height;
    self.frame = rect;
}

- (CGFloat)dyc_height{
    return self.frame.size.height;
}

- (void)setDyc_x:(CGFloat)dyc_x{
    CGRect rect = self.frame;
    rect.origin.x = dyc_x;
    self.frame = rect;
}

- (CGFloat)dyc_x{
    return self.frame.origin.x;
}

- (void)setDyc_y:(CGFloat)dyc_y{
    CGRect rect = self.frame;
    rect.origin.y = dyc_y;
    self.frame = rect;
}

- (CGFloat)dyc_y{
    return self.frame.origin.y;
}

- (void)setDyc_centerX:(CGFloat)dyc_centerX{
    CGPoint center = self.center;
    center.x = dyc_centerX;
    self.center = center;
}

- (CGFloat)dyc_centerX{
    return self.center.x;
}

- (void)setDyc_centerY:(CGFloat)dyc_centerY{
    CGPoint center = self.center;
    center.y = dyc_centerY;
    self.center = center;
}

- (CGFloat)dyc_centerY
{
    return self.center.y;
}
@end
